//package com.openmind.asm;
//
//import jdk.internal.org.objectweb.asm.*;
//
//import java.lang.instrument.ClassFileTransformer;
//import java.lang.instrument.IllegalClassFormatException;
//import java.security.ProtectionDomain;
//
///**
// * MyClassFileTransformer
// *
// * @author zhoujunwen
// * @date 2020-09-24 10:25
// * @desc
// */
//public class MyClassFileTransformer implements ClassFileTransformer {
//    @Override
//    public byte[] transform(ClassLoader loader, String className, Class<?> classBeingRedefined,
//                            ProtectionDomain protectionDomain, byte[] classfileBuffer) throws IllegalClassFormatException {
//        if (className.equals("me/ya/swing/StartupChecks")) {
//            ClassReader cr = new ClassReader(classfileBuffer);
//            ClassWriter cw = new ClassWriter(cr, ClassWriter.COMPUTE_FRAMES);
//            ClassVisitor cv = new MyClassVistor(Opcodes.ASM5, cw);
//            cr.accept(cv, ClassReader.SKIP_FRAMES | ClassReader.SKIP_DEBUG);
//            return cw.toByteArray();
//        }
//        return classfileBuffer;
//    }
//}
